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

:root {
    --coral: #FF6B5B;
    --coral-dark: #E8503F;
    --gold: #F5A623;
    --gold-light: #FFD98E;
    --teal: #1B8A82;
    --cream: #FFF8EC;
    --cream-card: #FFFDF8;
    --ink: #3A2A1E;
    --ink-soft: #7A6A5C;
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(245, 166, 35, 0.12), transparent 40%),
        radial-gradient(circle at 90% 25%, rgba(255, 107, 91, 0.12), transparent 45%),
        var(--cream);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: var(--ink);
    position: relative;
    overflow-x: hidden;
}

/* Confettis flottants */
.floaties {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floaties span {
    position: absolute;
    top: -10%;
    font-size: 1.8em;
    opacity: 0.55;
    animation: floatDown 14s linear infinite;
}

@keyframes floatDown {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.55; }
    90% { opacity: 0.55; }
    100% { transform: translateY(110vh) rotate(200deg); opacity: 0; }
}

/* Bannière festive */
.banner {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    z-index: 2;
}

.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 8px, transparent 9px),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 6px, transparent 7px),
        radial-gradient(circle at 35% 70%, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 10px, transparent 11px),
        radial-gradient(circle at 65% 55%, rgba(255,255,255,0.14) 0, rgba(255,255,255,0.14) 5px, transparent 6px),
        radial-gradient(circle at 92% 75%, rgba(255,255,255,0.16) 0, rgba(255,255,255,0.16) 7px, transparent 8px);
}

.banner-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: var(--coral);
    color: white;
    font-family: 'Fredoka', 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    padding: 8px 18px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(232, 80, 63, 0.35);
    white-space: nowrap;
}

/* Portrait de Phiphi qui chevauche la bannière */
.portrait-container {
    position: relative;
    margin-top: -140px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.portrait-ring {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--coral) 100%);
    box-shadow: 0 10px 28px rgba(58, 42, 30, 0.28);
}

.portrait {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    border: 5px solid var(--cream);
}

.container {
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--ink-soft);
    text-decoration: none;
}

.back-link:hover {
    color: var(--coral);
}

.eyebrow {
    display: inline-block;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 6px;
}

header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2em;
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--ink);
    font-weight: 700;
}

header h1 .highlight {
    color: var(--coral);
    position: relative;
}

.subtitle {
    font-size: 1em;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto;
}

/* Gros bouton photo (CTA principal) */
.cta-container {
    margin-bottom: 36px;
}

.cta-photo-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
}

.cta-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: linear-gradient(180deg, #F4F4F4 0%, #DCDCDC 100%);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        inset 0 -3px 5px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(58, 42, 30, 0.15);
    transition: transform 0.15s, box-shadow 0.2s;
}

.cta-photo-btn:hover .cta-circle {
    transform: translateY(-2px);
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        inset 0 -3px 5px rgba(0, 0, 0, 0.08),
        0 10px 24px rgba(58, 42, 30, 0.2);
}

.cta-photo-btn:active .cta-circle {
    transform: scale(0.96);
}

.cta-camera-icon {
    width: 42px;
    height: 42px;
    color: #6B6B6B;
}

.cta-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--ink);
}

.cta-sub {
    font-size: 0.88em;
    color: var(--ink-soft);
}

.wall-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: var(--coral-dark);
    text-decoration: none;
    padding: 10px;
}

.wall-link:hover {
    text-decoration: underline;
}

/* Aperçu de la photo dans la modale de détails */
.details-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.details-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(58, 42, 30, 0.15);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--ink-soft);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #EDE1CC;
    border-radius: 14px;
    font-size: 1em;
    font-family: inherit;
    color: var(--ink);
    background: #FFFCF6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: #BFB09A;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(255, 107, 91, 0.12);
}

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

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--coral) 0%, var(--gold) 100%);
    color: white;
    border: none;
    border-radius: 999px;
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(232, 80, 63, 0.3);
    transition: all 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(232, 80, 63, 0.4);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Mur de photos (photoboard) */
.photoboard {
    margin-top: 8px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.download-hint {
    text-align: center;
    font-size: 0.78em;
    color: var(--ink-soft);
    margin-top: -2px;
}

.download-all-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: 1.5px solid #EDE1CC;
    border-radius: 14px;
    background: #FFFCF6;
    color: var(--ink);
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.98em;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.download-all-btn:hover {
    border-color: var(--gold);
    background: rgba(245, 166, 35, 0.06);
}

.download-all-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.no-messages {
    text-align: center;
    color: var(--ink-soft);
    padding: 30px 20px;
    font-style: italic;
    grid-column: 1 / -1;
}

.photoboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.photo-card {
    background: white;
    border-radius: 14px;
    padding: 10px 10px 12px;
    box-shadow: 0 6px 16px rgba(58, 42, 30, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-card:nth-child(3n+1) { transform: rotate(-2deg); }
.photo-card:nth-child(3n+2) { transform: rotate(1.5deg); }
.photo-card:nth-child(3n+3) { transform: rotate(-1deg); }

.photo-card:hover {
    transform: rotate(0deg) translateY(-3px);
    box-shadow: 0 10px 22px rgba(58, 42, 30, 0.18);
    z-index: 2;
}

.photo-card-media {
    position: relative;
}

.photo-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-download-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-size: 0.85em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
}

.photo-download-btn:hover {
    background: white;
    transform: scale(1.08);
}

.photo-card-name {
    display: block;
    margin-top: 8px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--coral-dark);
    text-align: center;
}

.photo-card-text {
    font-size: 0.82em;
    color: var(--ink-soft);
    text-align: center;
    margin-top: 3px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.photo-card.note-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    background: var(--cream-card);
    border: 1.5px dashed var(--gold-light);
}

.photo-card.note-card .photo-card-quote {
    font-size: 1.6em;
    color: var(--gold);
    margin-bottom: 4px;
}

/* Lightbox (agrandissement d'une photo du mur) */
.lightbox {
    position: fixed;
    z-index: 999998;
    inset: 0;
    background-color: rgba(28, 20, 14, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    animation: fadeIn 0.2s ease-out;
    cursor: zoom-out;
}

.lightbox.hidden {
    display: none;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* Modal Styles */
.success-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(58, 42, 30, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.success-modal.hidden {
    display: none;
}

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

.success-modal-content {
    background-color: var(--cream-card);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 16px 50px rgba(58, 42, 30, 0.3);
    z-index: 1000000;
    border: 3px solid var(--gold-light);
}

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

.success-modal-close {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 28px;
    font-weight: bold;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 0.3s;
}

.success-modal-close:hover {
    color: var(--coral);
}

.success-modal-content h2 {
    font-family: 'Fredoka', sans-serif;
    color: var(--ink);
    margin-bottom: 15px;
    text-align: center;
}

.success-modal-content p {
    text-align: center;
    color: var(--ink-soft);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 999px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.social-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.social-btn.facebook {
    background: #1877F2;
}

.social-btn.instagram {
    background: #E4405F;
}

.social-btn.tiktok {
    background: #000000;
}

.social-btn.linkedin {
    background: #0077B5;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .portrait-container {
        margin-top: -100px;
    }

    .portrait-ring {
        width: 220px;
        height: 220px;
    }

    .success-modal-content {
        width: 95%;
        padding: 30px;
    }
}

/* Compact sur mobile */
@media (max-width: 480px) {
    .cta-container {
        margin-bottom: 26px;
    }

    .cta-circle {
        width: 88px;
        height: 88px;
    }

    .cta-camera-icon {
        width: 36px;
        height: 36px;
    }

    .cta-text {
        font-size: 1.05em;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        margin-bottom: 4px;
        font-size: 0.85em;
    }

    .form-group input[type="text"] {
        padding: 9px 12px;
    }

    .form-group textarea {
        min-height: 70px;
        padding: 9px 12px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 0.95em;
    }
}
