:root {
    --background: #f7f5f0;
    --surface: #ffffff;
    --text: #38342f;
    --muted: #898176;
    --accent: #a68d6d;
    --accent-dark: #887253;
    --border: #e9e4dc;
    --danger-bg: #fdf0ed;
    --danger: #a34f43;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    padding: 52px 46px 38px;
    border: 1px solid var(--border);
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(55, 45, 30, 0.045);
}

.brand-mark {
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-dark);
    font-family: Georgia, serif;
    font-size: 30px;
    font-style: italic;
}

.brand-name {
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 600;
    color: var(--accent-dark);
}

.separator {
    width: 42px;
    height: 1px;
    background: var(--accent);
    margin: 27px auto;
}

h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 12px;
}

.subtitle {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

form {
    text-align: left;
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 19px 0 9px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(166, 141, 109, 0.12);
}

button {
    width: 100%;
    min-height: 49px;
    margin-top: 27px;
    border: 0;
    border-radius: 3px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: var(--accent-dark);
}

.alert {
    padding: 12px;
    margin: 0 0 18px;
    border-radius: 3px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.footer-note {
    margin-top: 30px;
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 12px;
    font-style: italic;
}

footer {
    margin-top: 28px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 55px 28px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.dashboard-header h1 {
    margin-top: 12px;
}

.logout-button {
    width: auto;
    padding: 0 22px;
    margin: 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.logout-button:hover {
    background: var(--background);
}

.welcome-card,
.coming-soon {
    margin-top: 35px;
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.eyebrow {
    color: var(--accent-dark);
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;
}

.welcome-card h2,
.coming-soon h2 {
    font-family: Georgia, serif;
    font-size: 27px;
    font-weight: 400;
}

.welcome-card > p,
.coming-soon p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.account-info {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.account-info span {
    color: var(--muted);
}

@media (max-width: 520px) {
    .login-card {
        padding: 40px 25px 30px;
    }

    .dashboard {
        padding: 30px 16px;
    }

    .dashboard-header {
        align-items: flex-start;
    }

    .welcome-card,
    .coming-soon {
        padding: 24px;
    }

    .account-info {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

/* Navigation et gestion des mariages */

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions form {
    margin: 0;
}

.text-link,
.secondary-link {
    color: var(--accent-dark);
    font-size: 13px;
    text-decoration: none;
}

.text-link:hover,
.secondary-link:hover {
    text-decoration: underline;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    background: var(--accent);
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.primary-link:hover {
    background: var(--accent-dark);
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin: 42px 0 30px;
}

.page-intro h2,
.form-card h2 {
    margin: 10px 0;
    font-family: Georgia, serif;
    font-size: 29px;
    font-weight: 400;
}

.page-intro p:not(.eyebrow),
.form-intro {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.empty-state,
.form-card {
    padding: 42px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.empty-state {
    margin-top: 25px;
    text-align: center;
}

.empty-state h2 {
    font-family: Georgia, serif;
    font-weight: 400;
}

.empty-state p {
    margin-bottom: 25px;
    color: var(--muted);
    font-size: 14px;
}

.empty-mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent-dark);
    font-family: Georgia, serif;
    font-size: 27px;
    font-style: italic;
}

.wedding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.wedding-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.wedding-card-accent {
    height: 4px;
    margin: -28px -28px 25px;
    background: var(--accent);
}

.wedding-card h2 {
    margin: 15px 0 8px;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 400;
}

.wedding-date {
    color: var(--accent-dark);
    font-size: 13px;
}

.wedding-title {
    color: var(--muted);
    font-size: 13px;
}

.wedding-reference {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.success-message {
    margin: 20px 0;
    padding: 14px 16px;
    background: #edf5ed;
    border: 1px solid #d5e7d5;
    color: #35613b;
    font-size: 13px;
}

.form-card {
    max-width: 760px;
    margin: 35px auto;
}

.form-card form {
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-card input[type="text"],
.form-card input[type="date"],
.form-card textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.form-card textarea {
    min-height: 110px;
    resize: vertical;
}

.form-card input:focus,
.form-card textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(166, 141, 109, 0.12);
}

.color-field {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
}

.form-card input[type="color"] {
    width: 55px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.color-field span,
.required-note {
    color: var(--muted);
    font-size: 12px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    margin-top: 25px;
}

.form-actions button {
    width: auto;
    min-width: 180px;
    margin: 0;
    padding: 0 20px;
}

@media (max-width: 650px) {
    .header-actions,
    .page-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-card,
    .empty-state {
        padding: 24px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Cartes de mariage cliquables */
.wedding-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wedding-card-link:hover {
    transform: translateY(-3px);
}

.wedding-card-link:focus-visible {
    outline: 3px solid #a77d5b;
    outline-offset: 4px;
}

.wedding-card-link .wedding-card {
    height: 100%;
    cursor: pointer;
}

/* ==================================================
   FICHE DE GESTION D'UN MARIAGE
   ================================================== */

.wedding-management {
    max-width: 1180px;
}

.wedding-management .dashboard-header h1 {
    margin: 12px 0 8px;
}

.wedding-management .dashboard-header .eyebrow {
    margin-bottom: 0;
}

.wedding-page-intro {
    margin-top: 42px;
}

.wedding-status {
    display: inline-flex;
    align-items: center;
    padding: 9px 15px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.wedding-status.is-active {
    background: #edf5ed;
    color: #35613b;
}

.wedding-status.is-inactive {
    background: #f3eee7;
    color: var(--muted);
}

.wedding-info-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 12px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.wedding-info-item {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 22px 15px;
    border-bottom: 1px solid var(--border);
}

.wedding-info-item:nth-last-child(-n+2) {
    border-bottom: 0;
}

.wedding-info-item span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.3px;
}

.wedding-info-item strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.wedding-info-reference {
    grid-column: 1 / -1;
}

.wedding-tools-section {
    margin-top: 55px;
}

.wedding-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
}

.wedding-section-heading h2 {
    margin: 10px 0 0;
    font-family: Georgia, serif;
    font-size: 29px;
    font-weight: 400;
}

.wedding-section-heading > p {
    max-width: 360px;
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.wedding-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.wedding-tool-card {
    min-height: 210px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wedding-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(55, 45, 30, 0.06);
}

.tool-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent-dark);
    font-family: Georgia, serif;
    font-size: 23px;
}

.wedding-tool-card h3 {
    margin: 19px 0 9px;
    font-family: Georgia, serif;
    font-size: 21px;
    font-weight: 400;
}

.wedding-tool-card p {
    min-height: 42px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.wedding-tool-card > span {
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 650px) {
    .wedding-info-panel,
    .wedding-tools-grid {
        grid-template-columns: 1fr;
    }

    .wedding-info-item:nth-last-child(2) {
        border-bottom: 1px solid var(--border);
    }

    .wedding-info-reference {
        grid-column: auto;
    }

    .wedding-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .wedding-page-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .wedding-tool-card {
        padding: 24px;
    }
}
