/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sun-bg-1: #1e293b;
    --sun-bg-2: #334155;
    --sun-cyan: #06b6d4;
    --sun-violet: #8b5cf6;
    --sun-orange: #f59e0b;
    --sun-cyan-transparent: rgba(6, 182, 212, 0.25);
    --sun-violet-transparent: rgba(139, 92, 246, 0.25);
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --nav-bg: rgba(30, 41, 59, 0.95);
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header moderne avec dégradés */
header {
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 500px at 10% -10%, var(--sun-violet-transparent), transparent 60%),
        radial-gradient(1000px 500px at 110% -20%, var(--sun-cyan-transparent), transparent 60%),
        linear-gradient(180deg, var(--sun-bg-1), var(--sun-bg-2));
    color: #eaf6ff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.logo {
    width: 90px;
    height: auto;
    position: absolute;
    top: 20px;
    right: 20px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.4));
    z-index: 2;
}

.logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.6));
}

header h1 {
    margin: 0 0 12px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    font-size: clamp(28px, 4vw, 42px);
    background: linear-gradient(90deg, var(--sun-cyan), var(--sun-violet), var(--sun-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

header .subtitle {
    margin: 0.5rem 0 0;
    color: #e2e8f0;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation améliorée */
nav {
    background: var(--nav-bg);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

nav ul li {
    margin: 2px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: block;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s;
}

nav ul li a:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--sun-cyan);
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:active {
    transform: translateY(0);
}

/* Section principale */
.main-content {
    margin: 40px auto;
    width: 90%;
    max-width: 1200px;
    padding: 40px;
    background: var(--card-bg);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    flex: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Conteneur des boutons amélioré */
.btn-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 0;
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Boutons améliorés */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.8), rgba(30, 41, 59, 0.9));
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--sun-cyan), var(--sun-violet));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: var(--sun-cyan);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px);
}

/* Variantes de couleurs pour les boutons */
.btn-primary {
    border-color: rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    color: var(--sun-cyan);
}

.btn-primary::after {
    background: linear-gradient(135deg, var(--sun-cyan), #0891b2);
}

.btn-secondary {
    border-color: rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
    color: var(--sun-violet);
}

.btn-secondary::after {
    background: linear-gradient(135deg, var(--sun-violet), #7c3aed);
}

/* Section about discrète en bas */
.about-section {
    margin: 40px auto 20px;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.about-section h2 {
    color: var(--text-secondary);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.about-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
}

/* Pied de page */
footer {
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-secondary);
    padding: 25px;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(10px);
}

footer p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 25px 15px;
    }
    
    .logo {
        width: 70px;
        top: 15px;
        right: 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    nav ul {
        gap: 3px;
    }
    
    nav ul li a {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .main-content {
        width: 95%;
        padding: 30px 20px;
    }
    
    .btn-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
        min-height: 55px;
    }
    
    .about-section {
        width: 95%;
        padding: 25px 20px;
        margin: 30px auto 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 20px 10px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 6px;
    }
    
    nav ul li {
        margin: 0;
    }
    
    .btn-container {
        grid-template-columns: 1fr;
    }
    
    .btn {
        max-width: 100%;
        width: 100%;
    }
    
    .about-section {
        padding: 20px 15px;
    }
    
    .about-section h2 {
        font-size: 1.2rem;
    }
    
    .about-section p {
        font-size: 0.95rem;
    }
}



/* =====================  Responsive Corrections (GTZMaths)  =====================
   - Typo & spacing fluid with clamp()
   - Containers use full width on large screens while keeping readable text blocks
   - Mobile nav pattern (burger) if .nav-toggle / #site-nav exist in HTML
   - Media scale correctly (no overflow)
   - Buttons and grids adapt to screen size
=============================================================================== */

/* --- Base typography --- */
html{
  font-size: clamp(15px, 1.15vw, 18px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{ line-height: 1.55; }

/* Headings (sizes only; keeps your colors/weights) */
h1{ font-size: clamp(28px, 4vw, 56px); line-height: 1.1; }
h2{ font-size: clamp(22px, 2.8vw, 34px); line-height: 1.2; }
h3{ font-size: clamp(18px, 2.2vw, 24px); line-height: 1.25; }
p, li{ font-size: clamp(15px, 1.15vw, 18px); }

/* --- Containers / layout --- */
/* Full-width on large screens but keep inner horizontal padding */
.container, .wrap, .inner, main, .main, .page, .section, .content{
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(12px, 2vw, 28px);
}

/* Optional class for centered/narrow blocks of text within full-width sections */
.prose, .text, .narrow, .readable{
  max-width: 72ch;
  margin-inline: auto;
}

/* --- Media --- */
img, video, canvas, svg{ max-width: 100%; height: auto; display: block; }

/* --- Buttons & interactive elements --- */
button, .btn, input[type="button"], input[type="submit"]{
  padding: clamp(10px, 1.4vw, 14px) clamp(14px, 2.2vw, 22px);
  line-height: 1.1;
  border-radius: 12px;
  cursor: pointer;
}

/* --- Grids (opt-in with .auto to avoid breaking existing layouts) --- */
.grid.auto, .cards.auto, .card-grid.auto, .tiles.auto{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(12px, 1.8vw, 24px);
}

/* --- Nav (mobile burger if present) --- */
.nav-toggle{ touch-action: manipulation; }
#site-nav{ transition: transform .25s ease, opacity .25s ease; }
@media (max-width: 880px){
  /* Comfortable tap targets */
  a, button, .btn, .actions a{
    min-height: 44px; min-width: 44px;
  }
  /* Collapsible nav pattern */
  #site-nav{
    position: absolute;
    inset: auto 0 0 0;
    top: calc(var(--navBottom, 60px));
    background: rgba(0,0,0,.06);
    backdrop-filter: saturate(140%) blur(6px);
    border-top: 1px solid rgba(0,0,0,.08);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
  }
  #site-nav.open{ transform: translateY(0); opacity: 1; pointer-events: auto; }
  #site-nav a{ display:block; padding: 12px 16px; }
}

/* --- Ultra wide screens --- */
@media (min-width: 1600px){
  /* Let elements breathe more on very large displays */
  .grid.auto, .cards.auto, .card-grid.auto, .tiles.auto{
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  .prose, .text, .narrow, .readable{
    max-width: 80ch;
  }
}

/* --- Helpers --- */
:where(.hide-overflow){ overflow: hidden; }
:where(.no-wrap){ white-space: nowrap; }
:where(.center){ margin-inline: auto; text-align: center; }


