/* ==========================================================
   ZAWAJ MUBARAK — Design char3i raffiné
   Palette : crème, vert profond andalou, or vieilli
   ========================================================== */

/* Texte arabe : forcer le sens de lecture droite-à-gauche
   pour que les délimiteurs coraniques ﴿ ﴾ s'affichent dans le bon ordre */
[class*="arabic"],
[dir="rtl"] {
    direction: rtl;
    unicode-bidi: embed;
}

:root {
    --cream: #f5f0e6;
    --cream-deep: #ebe3d2;
    --paper: #fbf8f1;
    --ink: #1a2e1f;
    --ink-soft: #3a4a3f;
    --green: #1f3d2c;
    --green-deep: #14271c;
    --green-light: #4a6b53;
    --gold: #b8924e;
    --gold-deep: #8c6b32;
    --gold-light: #d4b574;
    --red-soft: #8b3a3a;
    --shadow: 0 2px 20px rgba(20, 39, 28, 0.08);
    --shadow-strong: 0 8px 40px rgba(20, 39, 28, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Lora', Georgia, serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.75;
    font-size: 18px;
    min-height: 100vh;
    min-height: 100dvh; /* prend en compte la barre du navigateur iOS qui apparaît/disparaît */
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(184, 146, 78, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(31, 61, 44, 0.04) 0%, transparent 40%);
}

p {
    font-size: 1.15rem;
    line-height: 1.8;
}

li {
    font-size: 1.1rem;
    line-height: 1.75;
}

.engagement p,
.engagement li,
.engagement-container p,
.commitment-list li {
    font-size: 1.2rem;
    line-height: 1.85;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Motifs géométriques décoratifs */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(184, 146, 78, 0.015) 35px, rgba(184, 146, 78, 0.015) 36px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(31, 61, 44, 0.015) 35px, rgba(31, 61, 44, 0.015) 36px);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--cream-deep);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(251, 248, 241, 0.92);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.brand {
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--green);
    font-weight: 700;
}

.brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-top: 2px;
}

.main-nav {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.main-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s;
}

.main-nav a:hover { color: var(--green); }
.main-nav a:hover::after { width: 100%; }

.nav-admin {
    border: 1px solid var(--green);
    padding: 0.5rem 1.2rem;
    border-radius: 2px;
    color: var(--green) !important;
}

.nav-admin:hover {
    background: var(--green);
    color: var(--paper) !important;
}

.nav-admin::after { display: none !important; }

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-content {
    position: relative;
    z-index: 1;
    flex: 1 0 auto; /* prend tout l'espace disponible → le footer reste collé en bas */
}

/* ==========================================================
   HERO (Accueil)
   ========================================================== */
.hero {
    text-align: center;
    padding: 6rem 2rem 5rem;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-ornament {
    font-family: 'Amiri', serif;
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-arabic {
    font-family: 'Amiri', serif;
    font-size: 2.4rem;
    color: var(--green);
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.15s ease-out forwards;
}

.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    opacity: 0;
    animation: fadeUp 0.8s 0.3s ease-out forwards;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold-deep);
    font-weight: 400;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--ink-soft);
    max-width: 680px;
    margin: 0 auto 3rem;
    font-style: italic;
    opacity: 0;
    animation: fadeUp 0.8s 0.45s ease-out forwards;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem auto;
    max-width: 200px;
    opacity: 0;
    animation: fadeUp 0.8s 0.5s ease-out forwards;
}

.hero-divider::before, .hero-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.hero-divider span {
    color: var(--gold);
    font-size: 1.5rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.6s ease-out forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   BUTTONS
   ========================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--green);
    color: var(--paper);
    border: 1px solid var(--green);
}

.btn-primary:hover {
    background: var(--green-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-secondary {
    background: transparent;
    color: var(--green);
    border: 1px solid var(--green);
}

.btn-secondary:hover {
    background: var(--green);
    color: var(--paper);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--gold);
    color: var(--paper);
    border: 1px solid var(--gold);
}

.btn-gold:hover {
    background: var(--gold-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-danger {
    background: var(--red-soft);
    color: var(--paper);
    border: 1px solid var(--red-soft);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

/* ==========================================================
   THREE CARDS — Comment ça marche
   ========================================================== */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title .label {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 1rem;
    display: block;
}

.section-title h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--green);
    line-height: 1.2;
}

.section-title h2 em {
    color: var(--gold-deep);
    font-style: italic;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: var(--paper);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
    position: relative;
    transition: all 0.4s;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
    border-color: var(--gold-light);
}

.step-number {
    font-family: 'Amiri', serif;
    font-size: 4.5rem;
    color: var(--gold);
    font-weight: 700;
    line-height: 1;
}

.step-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--green);
    margin: 1rem 0;
}

.step-card p {
    color: var(--ink-soft);
    font-size: 1rem;
}

/* ==========================================================
   PRINCIPES (valeurs char3i)
   ========================================================== */
.principles {
    background: var(--green);
    color: var(--cream);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.principles::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(184, 146, 78, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(184, 146, 78, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.principles-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.principles .section-title h2 {
    color: var(--cream);
}

.principles .section-title .label {
    color: var(--gold-light);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    text-align: left;
}

.principle {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.principle-icon {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.principle h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: var(--gold-light);
    font-weight: 500;
}

.principle p {
    color: var(--cream-deep);
    line-height: 1.6;
    font-size: 1rem;
}

/* ==========================================================
   FORM
   ========================================================== */
.form-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.form-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-page-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.form-page-header p {
    color: var(--ink-soft);
    font-style: italic;
}

.form-container {
    background: var(--paper);
    padding: 3rem;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--cream-deep);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    color: var(--green);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gold);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group label .required {
    color: var(--red-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--cream-deep);
    background: var(--cream);
    color: var(--ink);
    border-radius: 2px;
    transition: all 0.3s;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(184, 146, 78, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Lora', Georgia, serif;
}

.form-group .help-text {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-top: 0.4rem;
    font-style: italic;
}

.form-actions {
    margin-top: 3rem;
    text-align: center;
}

/* ==========================================================
   ENGAGEMENT (Charte char3i)
   ========================================================== */
.engagement {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.engagement-container {
    background: var(--paper);
    padding: 3.5rem;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
    box-shadow: var(--shadow);
    position: relative;
}

.engagement-container::before {
    content: '﷽';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--paper);
    padding: 0 1.5rem;
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: var(--gold);
}

.engagement h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    color: var(--green);
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.engagement .subtitle {
    text-align: center;
    color: var(--ink-soft);
    font-style: italic;
    margin-bottom: 2.5rem;
}

.commitment-list {
    list-style: none;
    margin: 2rem 0;
}

.commitment-list li {
    padding: 1.2rem 0 1.2rem 3rem;
    position: relative;
    border-bottom: 1px solid var(--cream-deep);
    color: var(--ink);
    line-height: 1.6;
}

.commitment-list li:last-child { border-bottom: none; }

.commitment-list li::before {
    content: '✦';
    position: absolute;
    left: 0.5rem;
    top: 1.2rem;
    color: var(--gold);
    font-size: 1.2rem;
}

.commitment-list li strong {
    color: var(--green);
    font-weight: 600;
}

.signature-box {
    margin-top: 2.5rem;
    padding: 1.8rem;
    background: var(--cream);
    border-radius: 2px;
    border-left: 4px solid var(--gold);
}

.signature-box label {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1.6;
}

.signature-box input[type="checkbox"] {
    margin-top: 0.3rem;
    width: 22px;
    height: 22px;
    accent-color: var(--green);
    cursor: pointer;
    flex-shrink: 0;
}

.sexe-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.sexe-choice label {
    background: var(--cream);
    padding: 1.5rem;
    text-align: center;
    border: 2px solid var(--cream-deep);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    color: var(--green);
}

.sexe-choice input[type="radio"] {
    display: none;
}

.sexe-choice input[type="radio"]:checked + label,
.sexe-choice label.selected {
    background: var(--green);
    color: var(--paper);
    border-color: var(--green);
}

/* ==========================================================
   MESSAGES
   ========================================================== */
.alert {
    padding: 1.2rem 1.5rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.alert-success {
    background: rgba(31, 61, 44, 0.08);
    border-left: 4px solid var(--green);
    color: var(--green-deep);
}

.alert-error {
    background: rgba(139, 58, 58, 0.08);
    border-left: 4px solid var(--red-soft);
    color: var(--red-soft);
}

.alert-info {
    background: rgba(184, 146, 78, 0.1);
    border-left: 4px solid var(--gold);
    color: var(--gold-deep);
}

/* ==========================================================
   SUCCESS PAGE
   ========================================================== */
.success-page {
    max-width: 700px;
    margin: 4rem auto;
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    font-family: 'Amiri', serif;
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.success-page h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    color: var(--green);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.success-page p {
    font-size: 1.2rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

/* ==========================================================
   ADMIN
   ========================================================== */
.admin-login {
    max-width: 460px;
    margin: 5rem auto;
    padding: 3rem;
    background: var(--paper);
    border-radius: 2px;
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--cream-deep);
}

.admin-login h1 {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: var(--green);
    margin-bottom: 2rem;
    font-weight: 400;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
    background: var(--cream);
}

.admin-sidebar {
    background: var(--green-deep);
    color: var(--cream);
    padding: 2rem 0;
}

.admin-sidebar .logo {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
}

.admin-sidebar .logo .arabic {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--gold-light);
    display: block;
}

.admin-sidebar .logo .name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream-deep);
    margin-top: 4px;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
}

.admin-sidebar nav a {
    color: var(--cream-deep);
    text-decoration: none;
    padding: 1rem 2rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(184, 146, 78, 0.15);
    color: var(--gold-light);
    border-left-color: var(--gold);
}

.admin-main {
    padding: 2.5rem 3rem;
    overflow-x: auto;
}

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

.admin-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    color: var(--green);
    font-weight: 400;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--paper);
    padding: 1.8rem;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
    border-left: 4px solid var(--gold);
}

.stat-card .stat-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    color: var(--green);
    font-weight: 500;
    line-height: 1;
}

.stat-card .stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-top: 0.5rem;
}

.profiles-table {
    background: var(--paper);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--cream-deep);
    width: 100%;
    border-collapse: collapse;
}

.profiles-table th {
    background: var(--green);
    color: var(--paper);
    text-align: left;
    padding: 1rem 1.2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.profiles-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--cream-deep);
    font-size: 1rem;
}

.profiles-table tr:hover {
    background: var(--cream);
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-en_attente { background: rgba(184, 146, 78, 0.15); color: var(--gold-deep); }
.status-approuve { background: rgba(31, 61, 44, 0.15); color: var(--green); }
.status-refuse { background: rgba(139, 58, 58, 0.15); color: var(--red-soft); }
.status-marie { background: rgba(184, 146, 78, 0.3); color: var(--gold-deep); font-weight: 600; }

.profile-detail {
    background: var(--paper);
    padding: 3rem;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
}

.profile-photo-large {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid var(--cream-deep);
}

.profile-photo-placeholder {
    width: 220px;
    height: 220px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-style: italic;
    border-radius: 2px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem 2rem;
    margin: 2rem 0;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cream-deep);
}

.info-row .label {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.info-row .value {
    font-size: 1.1rem;
    color: var(--ink);
}

.detail-section {
    margin: 2.5rem 0;
}

.detail-section h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: var(--green);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.actions-bar {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--cream-deep);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
    background: var(--green-deep);
    color: var(--cream-deep);
    padding: 4rem 2rem 2rem;
    margin-top: 5rem;
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.footer-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--gold-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-trans {
    font-style: italic;
    color: var(--cream-deep);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.footer-trans em {
    color: var(--gold-light);
    font-style: italic;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: rgba(245, 240, 230, 0.5);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
    body { font-size: 16px; }
    
    .header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav a { font-size: 0.9rem; }
    
    .hero { padding: 3rem 1.5rem; }
    
    .form-container, .engagement-container {
        padding: 1.8rem;
    }
    
    .form-grid, .form-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        padding: 1rem;
    }
    
    .admin-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-sidebar nav a {
        padding: 0.5rem 1rem;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    
    .admin-main {
        padding: 1.5rem;
    }
    
    .profiles-table {
        font-size: 1rem;
    }
    
    .profiles-table th,
    .profiles-table td {
        padding: 0.6rem;
    }
}

/* ==========================================================
   Formulaire d'inscription multi-étapes
   ========================================================== */

/* Barre de progression */
.form-progress {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.form-progress-bar {
    height: 3px;
    background-color: var(--cream-deep);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.form-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--green));
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-progress-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    counter-reset: stepcount;
}

.form-progress-steps li {
    flex: 1;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s;
    opacity: 0.45;
}

.form-progress-steps li.active,
.form-progress-steps li.completed {
    opacity: 1;
}

.form-progress-steps li:hover {
    opacity: 0.85;
}

.form-progress-steps .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--cream-deep);
    color: var(--ink-soft);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-progress-steps li.active .step-num {
    background-color: var(--green);
    color: var(--cream);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(184, 146, 78, 0.15);
}

.form-progress-steps li.completed .step-num {
    background-color: var(--gold);
    color: var(--cream);
}

.form-progress-steps li.completed .step-num::after {
    content: '✓';
    font-size: 1.1rem;
}

.form-progress-steps li.completed .step-num {
    font-size: 0;  /* cache le chiffre */
}

.form-progress-steps .step-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    font-weight: 500;
}

.form-progress-steps li.active .step-label {
    color: var(--green);
    font-weight: 600;
}

/* Étapes du formulaire */
.form-step {
    display: none;
    animation: stepFade 0.35s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes stepFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-step-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--green);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-step-desc {
    text-align: center;
    color: var(--ink-soft);
    font-style: italic;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

/* Navigation entre étapes */
.form-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cream-deep);
}

.form-step-nav .btn {
    min-width: 160px;
}

.form-step-nav span {
    /* Placeholder pour aligner le bouton "Continuer" à droite quand pas de bouton "Précédent" */
    display: inline-block;
    min-width: 160px;
}

/* Indication visuelle des champs invalides */
.field-invalid {
    border-color: #c4543a !important;
    background-color: rgba(196, 84, 58, 0.04) !important;
    box-shadow: 0 0 0 2px rgba(196, 84, 58, 0.1) !important;
}

@media (max-width: 600px) {
    .form-progress-steps .step-label {
        font-size: 0.7rem;
    }
    .form-progress-steps .step-num {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    .form-step-title {
        font-size: 1.5rem;
    }
    .form-step-nav {
        flex-direction: column-reverse;
        gap: 0.8rem;
    }
    .form-step-nav .btn,
    .form-step-nav span {
        width: 100%;
        min-width: 0;
    }
}

/* ==========================================================
   Pages légales (mentions, confidentialité, CGU)
   ========================================================== */
.legal-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--green);
    font-size: 1.4rem;
    font-weight: 500;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--cream-deep);
}

.legal-content h4 {
    font-family: 'Lora', Georgia, serif;
    color: var(--green-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.legal-content p { margin-bottom: 1rem; }

.legal-content ul,
.legal-content ol {
    margin: 0.8rem 0 1.2rem 1.5rem;
    line-height: 1.9;
}
.legal-content li { margin-bottom: 0.4rem; }

.legal-content a {
    color: var(--gold-deep);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(184, 146, 78, 0.3);
}
.legal-content a:hover {
    text-decoration-color: var(--gold-deep);
}

.legal-content code {
    background: var(--cream-deep);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--green-deep);
}

/* Marqueurs [À COMPLÉTER] mis en évidence discrète */
.legal-content p:has(strong:first-child) {
    /* Styling pour les paragraphes de définition */
}

/* Footer — bas de page (copyright à gauche, liens légaux à droite) */
.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(245, 240, 230, 0.08);
}

.footer-copyright {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: rgba(245, 240, 230, 0.55) !important;
    letter-spacing: 0.02em;
}

.footer-legal {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    color: rgba(245, 240, 230, 0.4);
}

.footer-legal a {
    color: rgba(245, 240, 230, 0.6) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-legal a:hover {
    color: var(--gold) !important;
}

.footer-legal .sep {
    margin: 0 0.4rem;
    color: rgba(245, 240, 230, 0.25);
}

@media (max-width: 700px) {
    .footer-bottom-row {
        flex-direction: column;
        text-align: center;
        gap: 0.7rem;
    }
    .footer-legal .sep {
        display: none;
    }
    .footer-legal a {
        display: inline-block;
        margin: 0 0.5rem;
        line-height: 1.9;
    }
}

/* ==========================================================
   FAQ — Accordéon
   ========================================================== */
.faq-container {
    margin-top: 2rem;
}

.faq-item {
    background: var(--paper);
    border: 1px solid var(--cream-deep);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.faq-item:hover {
    border-color: var(--gold);
    box-shadow: 0 2px 12px rgba(31, 61, 44, 0.06);
}

.faq-item[open] {
    border-color: var(--green);
    box-shadow: 0 2px 16px rgba(31, 61, 44, 0.08);
}

.faq-item summary {
    cursor: pointer;
    padding: 1.25rem 3rem 1.25rem 1.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--green);
    position: relative;
    list-style: none;
    transition: background-color 0.2s ease;
}

.faq-item summary:hover {
    background-color: rgba(184, 146, 78, 0.04);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--gold);
    transition: transform 0.25s ease;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--ink-soft);
    line-height: 1.8;
    border-top: 1px solid var(--cream-deep);
    padding-top: 1.25rem;
    animation: faqFade 0.3s ease-out;
}

.faq-answer p { margin-bottom: 0.8rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul,
.faq-answer ol { margin: 0.8rem 0 0.8rem 1.5rem; line-height: 1.9; }
.faq-answer li { margin-bottom: 0.3rem; }
.faq-answer a { color: var(--gold-deep); font-weight: 500; }

@keyframes faqFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .faq-item summary {
        font-size: 1.05rem;
        padding: 1rem 2.5rem 1rem 1.2rem;
    }
    .faq-item summary::after { right: 1.2rem; font-size: 1.4rem; }
    .faq-answer { padding: 1rem 1.2rem 1.2rem; }
}

/* ==========================================================
   OPTIMISATIONS MOBILE — Touch targets, scrolling, layout
   ========================================================== */
@media (max-width: 768px) {
    /* Tables admin scrollables horizontalement plutôt que squashées */
    .profiles-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .profiles-table th,
    .profiles-table td {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }

    /* Cartes dashboard : grid plus dense sur mobile */
    .dash-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 0.7rem !important;
    }
    .dash-card,
    a.dash-card {
        padding: 1rem 1.1rem !important;
    }
    .dash-num { font-size: 1.7rem !important; }
    .dash-section-title { font-size: 1.15rem !important; margin: 1.5rem 0 0.8rem !important; }

    /* Formulaire d'édition mon-espace : pleine largeur */
    .zawaj-form .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Boutons d'admin : un peu plus gros sur mobile pour le touch */
    .btn-sm {
        padding: 0.6rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* En-tête de profil dans mises_en_contact.php : empiler verticalement */
    .admin-main [style*="display:flex"][style*="gap:1.5rem"][style*="flex-wrap:wrap"] {
        gap: 1rem !important;
    }

    /* Pages légales : marges réduites */
    .legal-content {
        padding: 1.5rem 1.2rem !important;
    }

    /* Boutons CTA principaux : pleine largeur sur mobile, mais SEULEMENT dans les form-actions / form-step-nav,
       pas dans les cta-group (où les 2 boutons doivent rester côte à côte avec la même taille) */
    .form-actions .btn-primary,
    .form-step-nav .btn-primary,
    button[type="submit"].btn-primary:not(.cta-group .btn-primary) {
        width: 100%;
        text-align: center;
    }

    /* Dans la cta-group de la page d'accueil : les 2 boutons doivent avoir EXACTEMENT la même taille */
    .cta-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 0 1rem;
    }
    .cta-group .btn,
    .cta-group .btn-primary,
    .cta-group .btn-gold {
        width: 100%;
        text-align: center;
        padding: 1.1rem 1.5rem;
        font-size: 0.95rem;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    /* Espacements généraux réduits sur très petit écran */
    .main-content { padding: 1rem !important; }
    .container { padding: 0 1rem !important; }

    /* Form labels plus serrés */
    .form-group label { font-size: 0.95rem; }

    /* Cartes mon-espace : padding réduit */
    section.container > div[style*="padding:22px"] {
        padding: 16px 18px !important;
    }
}

/* ==========================================================
   MENU HAMBURGER MOBILE
   ========================================================== */

/* Bouton hamburger : caché par défaut sur desktop */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--cream-deep);
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: border-color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}
.nav-toggle:hover { border-color: var(--gold); background: rgba(184, 146, 78, 0.05); }
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--green);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Quand le menu est ouvert : le hamburger devient une croix */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 5px);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -5px);
}

/* Zone invisible derrière le menu — capture les clics pour fermer le menu */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 998;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.3s;
    cursor: pointer;
}
.nav-backdrop.active {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s linear 0s;
}

/* ====== Affichage menu compact (hamburger) : nav devient un panneau latéral ======
   Déclenché plus tôt (≤ 1200px) pour que les 10 liens ne débordent jamais.
   Au-dessus de 1200px, la barre complète s'affiche. ====== */
@media (max-width: 1200px) {
    /* Header doit être AU-DESSUS du backdrop (z-index 998) pour que les liens
       du menu soient cliquables. Avant : z-index:100 dans la CSS de base. */
    .site-header {
        z-index: 1000 !important;
    }

    /* Header en grille 3 colonnes : [vide] [brand centré] [hamburger à droite] */
    .header-inner {
        display: grid !important;
        grid-template-columns: 44px 1fr 44px !important;
        flex-direction: initial !important;
        justify-content: initial !important;
        align-items: center !important;
        gap: 0.8rem !important;
        padding: 1rem 1.2rem !important;
    }

    .brand {
        grid-column: 2;
        justify-self: center;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
        grid-column: 3;
        justify-self: end;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(85vw, 320px);
        height: 100vh;
        height: 100dvh; /* dynamic viewport, plus précis sur iOS */
        background: var(--paper);
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        padding: 5rem 1.8rem 2rem;
        gap: 0 !important;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
        z-index: 999;
        box-shadow: -4px 0 30px rgba(20, 39, 28, 0.18);
        overflow-y: auto;
    }

    .main-nav.nav-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
    }

    .main-nav a {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--cream-deep);
        font-size: 1rem !important;
        color: var(--green);
        text-decoration: none;
        letter-spacing: 0.04em;
        font-weight: 500;
    }
    .main-nav a:hover,
    .main-nav a:focus {
        color: var(--gold-deep);
    }
    .main-nav a:last-child {
        border-bottom: none;
        margin-top: 1rem;
        padding: 1rem 1.5rem;
        background: var(--green);
        color: var(--paper) !important;
        border-radius: 3px;
        text-align: center;
        font-weight: 600 !important;
        letter-spacing: 0.08em;
    }

    /* Le brand reste lisible mais réduit */
    .brand-arabic { font-size: 1.3rem !important; }
    .brand-name { font-size: 0.85rem !important; letter-spacing: 0.08em; }
}
