:root {
    --color-primary: #041B3A; /* Bleu Nuit Inst. */
    --color-primary-hover: #09264e;
    --color-secondary: #c8102e; /* Rouge Inst. */
    --color-gold: #d4af37; /* Or Inst. */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-success: #15803d;
    --color-success-bg: #f0fdf4;
    --color-warning: #b45309;
    --color-warning-bg: #fffbeb;
    --color-error: #b91c1c;
    --color-error-bg: #fef2f2;
    --color-info: #0369a1;
    --color-info-bg: #f0f9ff;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.app-loading .app-view {
    display: none !important;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Lexend', sans-serif;
}

/* Header & Navigation */
.navbar {
    background: var(--color-primary);
    border-bottom: 3px solid var(--color-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    white-space: nowrap;
    order: 3;
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.brand-logo:hover {
    transform: scale(1.06);
}

.brand-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    flex-shrink: 0;
}

.brand-text h1 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
}

.brand-text p {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.institution-title {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    min-width: 0;
    color: #ffffff;
    font-family: 'Lexend', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    order: 1;
}

.institution-title > div {
    display: flex;
    flex-direction: column;
}

.institution-logo {
    width: 38px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.institution-title small {
    color: rgba(255, 255, 255, 0.78);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    order: 2;
}

.user-identity {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-right: 0.25rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Button 17 Styling */
.button-17, .nav-btn {
  align-items: center;
  appearance: none;
  background-color: #fff;
  border-radius: 24px;
  border-style: none;
  box-shadow: rgba(0, 0, 0, .2) 0 3px 5px -1px,rgba(0, 0, 0, .14) 0 6px 10px 0,rgba(0, 0, 0, .12) 0 1px 18px 0;
  box-sizing: border-box;
  color: #3c4043;
  cursor: pointer;
  display: inline-flex;
  fill: currentcolor;
  font-family: "Google Sans",Roboto,Arial,sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  height: auto;
  min-height: 38px;
  justify-content: center;
  letter-spacing: .2px;
  line-height: 1.4;
  max-width: 100%;
  overflow: visible;
  padding: 6px 16px;
  position: relative;
  text-align: center;
  text-transform: none;
  transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),opacity 15ms linear 30ms,transform 270ms cubic-bezier(0, 0, .2, 1) 0ms, background-color 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: auto;
  will-change: transform,opacity;
  z-index: 0;
  text-decoration: none;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.button-17:hover, .nav-btn-outline:hover {
  background: #F6F9FE;
  color: #174ea6;
}

.button-17:active, .nav-btn:active {
  box-shadow: 0 4px 4px 0 rgb(60 64 67 / 30%), 0 8px 12px 6px rgb(60 64 67 / 15%);
  outline: none;
}

.button-17:focus, .nav-btn:focus {
  outline: none;
  border: 2px solid #4285f4;
}

.button-17:not(:disabled), .nav-btn:not(:disabled) {
  box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
}

.button-17:not(:disabled):hover, .nav-btn:not(:disabled):hover {
  box-shadow: rgba(60, 64, 67, .3) 0 2px 3px 0, rgba(60, 64, 67, .15) 0 6px 10px 4px;
}

.button-17:not(:disabled):focus, .nav-btn:not(:disabled):focus {
  box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
}

.button-17:not(:disabled):active, .nav-btn:not(:disabled):active {
  box-shadow: rgba(60, 64, 67, .3) 0 4px 4px 0, rgba(60, 64, 67, .15) 0 8px 12px 6px;
}

.button-17:disabled, .nav-btn:disabled {
  box-shadow: rgba(60, 64, 67, .3) 0 1px 3px 0, rgba(60, 64, 67, .15) 0 4px 8px 3px;
  opacity: 0.6;
  cursor: not-allowed;
}

.nav-btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.nav-btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #ffffff;
}

.nav-btn-outline {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    color: #000000;
}

.navbar .nav-btn-outline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.58);
    color: #ffffff;
}

.navbar .nav-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: var(--color-gold);
    color: #ffffff;
}

.navbar .nav-btn-primary {
    background-color: var(--color-gold);
    color: #000000;
}

.navbar .nav-btn-primary:hover {
    background-color: #e3bd45;
    color: #000000;
}

/* Layout Main Container */
.main-wrapper {
    max-width: 1280px;
    margin: 1rem auto 2rem auto;
    padding: 0 1.5rem;
    min-height: 80vh;
    flex-grow: 1;
    width: 100%;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Forms general */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--color-text-main);
}

.form-label .required {
    color: var(--color-secondary);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--color-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(4, 27, 58, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* Badges de Statut */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-brouillon { background: #f1f5f9; color: #475569; }
.status-soumise { background: var(--color-info-bg); color: var(--color-info); }
.status-en_verification { background: #eff6ff; color: #1d4ed8; }
.status-pieces_complementaires { background: var(--color-warning-bg); color: var(--color-warning); }
.status-en_traitement { background: #f5f3ff; color: #6d28d9; }
.status-approuvee { background: var(--color-success-bg); color: var(--color-success); }
.status-refusee { background: var(--color-error-bg); color: var(--color-error); }
.status-cloturee { background: #e2e8f0; color: #334155; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--color-surface);
    width: 90%;
    max-width: 540px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #1e293b;
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left: 4px solid var(--color-success); }
.toast-error { border-left: 4px solid var(--color-secondary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-btn {
        padding: 5px 12px;
        font-size: 12.5px;
    }
}

@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 0.85rem; text-align: center; }
    .nav-links { justify-content: center; width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .card { padding: 1.25rem; }
}

/* Hero Banner Card with dynamic full-size images */
.hero-banner-card {
    position: relative;
    overflow: hidden;
    color: white;
    padding: 5.5rem 2.5rem;
    border: none;
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #041B3A 0%, #021126 100%);
    box-shadow: var(--shadow-lg);
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    transform: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.hero-bg-slide.active {
    opacity: 1;
    transform: none;
}

.hero-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(135deg, rgba(4, 27, 58, 0.88) 0%, rgba(2, 17, 38, 0.92) 100%);
    transition: background 0.5s ease;
}

/* Quand des images sont téléversées, l'overlay devient un voile sombre transparent pour révéler l'image sur TOUT le bloc */
.hero-banner-overlay.has-images {
    background: linear-gradient(180deg, rgba(2, 17, 38, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);
}

.hero-banner-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Contrôles du diaporama directement sur les bords de la carte Hero */
.hero-nav-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.hero-nav-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.hero-nav-btn:hover {
    background: var(--color-gold);
    color: black;
    border-color: var(--color-gold);
    transform: scale(1.1);
}

.hero-dots-container {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.hero-dot-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.25s ease;
}

.hero-dot-item.active {
    background: var(--color-gold);
    transform: scale(1.3);
    border-color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes btnShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Hero Call to Action Buttons Styling */
.hero-cta-container {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.85rem;
    position: relative;
    z-index: 5;
}

.hero-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 13px 30px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Google Sans', 'Lexend', Roboto, sans-serif;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
    -webkit-user-select: none;
    will-change: transform, box-shadow;
    letter-spacing: 0.25px;
    min-height: 50px;
}

.hero-btn .hero-btn-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-btn:hover .hero-btn-icon {
    transform: scale(1.25) rotate(-8deg);
}

.hero-btn .hero-btn-text {
    transition: transform 0.3s ease;
}

.hero-btn .hero-btn-arrow {
    font-size: 1.15rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    width: 0;
    overflow: hidden;
}

.hero-btn:hover .hero-btn-arrow {
    opacity: 1;
    transform: translateX(0);
    width: auto;
    margin-left: 2px;
}

/* Bouton Or / Solaire Prestige */
.hero-btn-gold {
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 50%, #E67E22 100%);
    color: #0b192c;
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.hero-btn-gold:hover {
    background: linear-gradient(135deg, #FFF388 0%, #FFB74D 50%, #F39C12 100%);
    color: #041B3A;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 35px rgba(243, 156, 18, 0.6), 0 0 25px rgba(255, 226, 89, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.hero-btn-gold:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35);
}

/* Effet Shimmer / Reflet lumineux qui traverse le bouton */
.hero-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.hero-btn-gold:hover .hero-btn-shine {
    animation: btnShimmer 1.1s ease-in-out infinite;
}

/* Bouton Verre Givré / Glassmorphism */
.hero-btn-glass {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.hero-btn-glass:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 255, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

.hero-btn-glass:active {
    transform: translateY(1px) scale(0.98);
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
    .hero-cta-container {
        flex-direction: column;
        width: 100%;
        gap: 0.85rem;
    }
    .hero-btn {
        width: 100%;
        max-width: 320px;
        font-size: 0.95rem;
        padding: 12px 20px;
    }
}

/* Animation fluide d'apparition au scroll / chargement */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Grille des 3 avantages d'accueil */
.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.home-feature-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.home-feature-image {
    width: calc(100% + 3.5rem);
    height: 170px;
    margin: -1.75rem -1.75rem 1.25rem;
    object-fit: cover;
}

.home-feature-loading {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.home-feature-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.home-feature-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-feature-editor {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.home-feature-editor h4 {
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.home-feature-editor-image,
.home-feature-editor-placeholder {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.home-feature-editor-placeholder {
    display: grid;
    place-items: center;
    color: var(--color-text-muted);
    background: var(--color-surface);
    font-size: 0.85rem;
}

.feature-remove-image {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #b91c1c;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .home-feature-photo-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-editor-grid {
        grid-template-columns: 1fr;
    }
}

.home-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-gold) 100%);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(4, 27, 58, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: rgba(212, 175, 55, 0.45);
}

.home-feature-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.feature-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.home-feature-card:hover .feature-icon-wrapper {
    transform: scale(1.15) rotate(6deg);
    background: #e0f2fe;
}

.feature-title {
    color: var(--color-primary);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.3;
}

.feature-desc {
    font-size: 0.915rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 0.2rem;
}

/* Carte officielle pièces à fournir */
.official-requirements-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-left: 6px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.035);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.official-requirements-card:hover {
    box-shadow: 0 12px 30px rgba(4, 27, 58, 0.07);
}

.official-requirements-header {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.95rem;
    margin-bottom: 1.65rem;
}

.official-badge-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: inline-block;
    margin-bottom: 0.35rem;
}

.official-section-title {
    color: var(--color-primary);
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.requirement-card-item {
    background: #f8fafc;
    padding: 1.15rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.requirement-card-item:hover {
    background: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(4, 27, 58, 0.08);
}

.req-number {
    font-size: 1.25rem;
    background: #e8f5e9;
    color: var(--color-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.requirement-card-item:hover .req-number {
    background: var(--color-primary);
    color: #ffffff;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(4, 27, 58, 0.25);
}

.req-content {
    flex: 1;
}

.req-title {
    color: var(--color-text-main);
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
    letter-spacing: 0.2px;
}

.req-text {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}


/* Footer */
.site-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 1.1rem 1.5rem;
    font-family: "Google Sans", Roboto, Arial, sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    border-top: 3px solid var(--color-gold);
    margin-top: auto;
}

.site-footer strong {
    color: var(--color-gold);
    font-weight: 600;
}

@media (max-width: 768px) {
    .nav-container {
        align-items: flex-start;
        padding: 0.7rem 1rem;
    }

    .brand-text h1 {
        font-size: 0.95rem;
    }

    .brand {
        order: 1;
    }

    .nav-links {
        order: 2;
    }

    .brand-text p {
        font-size: 0.58rem;
    }

    .institution-title {
        display: none;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-btn {
        flex: 1 1 auto;
    }

    .user-identity {
        width: 100%;
        white-space: normal;
    }

    .official-requirements-card {
        padding: 1.25rem;
        border-left-width: 4px;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
    }

    .official-section-title {
        font-size: 1.08rem;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   VUE INFORMATION LÉGALE - CONDITIONS DE SÉJOUR
   ============================================= */
.legal-doc {
    max-width: 920px;
    margin: 0 auto;
}

.legal-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.legal-header h2 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin: 0.5rem 0;
}

.legal-header p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.legal-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    margin-bottom: 1.75rem;
}

.legal-block h3 {
    color: var(--color-primary);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gold);
}

.legal-block h4 {
    color: var(--color-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.5rem 0 0.75rem;
}

.legal-article {
    margin-bottom: 1.1rem;
    padding: 0.9rem 1rem;
    background: var(--color-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.legal-article strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-family: 'Lexend', sans-serif;
}

.legal-article p {
    font-size: 0.9rem;
    color: var(--color-text-main);
    margin-bottom: 0.4rem;
    text-align: justify;
    hyphens: auto;
}

.legal-article p:last-child {
    margin-bottom: 0;
}

.legal-footer {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
