/* Compléments de styles propres à la version PHP / MySQL de Noces QR. */

/* --- Formulaires d’authentification (e-mail + mot de passe) --- */
.auth-form { display: grid; gap: 14px; width: 100%; margin: 0 0 6px; }
.auth-form .field input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #e3d6cf; border-radius: 12px; background: #fff; font: inherit; font-size: 14px; font-weight: 500; color: #2b2025; }
.auth-form .field input:focus { outline: 2px solid color-mix(in srgb, var(--wine, #7b2d42) 35%, transparent); border-color: var(--wine, #7b2d42); }
.auth-form .field > span a { font-weight: 600; color: var(--wine, #7b2d42); text-decoration: none; }
.auth-form .field > span a:hover { text-decoration: underline; }
.auth-form .primary-button { width: 100%; justify-content: center; min-height: 48px; }
.auth-form .terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: #54494d; }
.auth-form .terms-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--wine, #7b2d42); flex: none; }
.auth-form .field small { color: #8b7d82; font-weight: 500; }

.auth-divider { display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0; color: #a19498; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e8dcd5; }

.google-button { display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 10px; min-height: 48px; text-decoration: none; }
.google-button svg { flex: none; }

.auth-switch { margin: 16px 0 10px; font-size: 13px; color: #6d6064; }
.auth-switch a { color: var(--wine, #7b2d42); font-weight: 650; }
.auth-action > a:last-child { margin-top: 6px; font-size: 13px; color: #6d6064; }
.auth-page > .form-error { max-width: 640px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 12px; background: #fbeef0; }
.auth-notice { width: 100%; padding: 12px 14px; border-radius: 12px; background: #eef7f0; color: #2c6a3d; font-size: 13px; line-height: 1.5; }

/* --- Page compte : deux formulaires empilés --- */
.account-forms { display: grid; gap: 20px; min-width: 0; }
.account-form .field input { min-height: 44px; }
.account-success { margin: 0; padding: 10px 14px; border-radius: 12px; background: #eef7f0; color: #2c6a3d; font-size: .875rem; }

/* --- Chevalets de table --- */
.tent-settings { display: grid; gap: 16px; align-content: start; }
.tent-settings fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.tent-settings fieldset > * { min-width: 0; }
.tent-settings .print-field { display: grid; gap: 6px; }
.tent-settings .print-field select { min-height: 44px; }
.tent-settings .upload-button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px dashed #d8c6bd; border-radius: 12px; cursor: pointer; font-size: .875rem; font-weight: 650; color: var(--wine, #7b2d42); }
.tent-settings .upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tent-settings .print-ready-guest-list { align-self: start; }
.tent-table-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 14px; max-height: 240px; overflow: auto; padding: 4px 2px; align-content: start; }
.tent-table-list small { font-size: 13px; color: #8b7d82; }

/* --- Studio : panneau de placement --- */
.print-placement-panel { display: grid; gap: 14px; }

@media (max-width: 640px) {
  .auth-action { padding: 28px 20px; }
  .tent-settings fieldset { grid-template-columns: 1fr; }
}

/* --- Application installable (PWA) --- */
[data-pwa-install] { display: none !important; }
html.pwa-can-install:not(.pwa-standalone) .pwa-install-item,
html.pwa-manual-install:not(.pwa-standalone) .pwa-install-item { display: flex !important; }
html.pwa-can-install:not(.pwa-standalone) .pwa-install-link,
html.pwa-manual-install:not(.pwa-standalone) .pwa-install-link,
html.pwa-can-install:not(.pwa-standalone) .pwa-install-chip,
html.pwa-manual-install:not(.pwa-standalone) .pwa-install-chip { display: inline-flex !important; }
.pwa-install-chip { min-height: 36px; padding: 0 12px; font-size: 13px; margin-left: auto; align-items: center; gap: 4px; }
.pwa-install-item { width: 100%; text-align: left; }

.pwa-banner { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid #e5d8d1; border-radius: 18px; background: #fffdf9; box-shadow: 0 20px 60px #3e252e33; transform: translateY(140%); transition: transform .35s ease; }
.pwa-banner.visible { transform: none; }
.pwa-banner img { border-radius: 12px; }
.pwa-banner strong { display: block; font-size: 14px; color: #2b2025; }
.pwa-banner span { display: block; font-size: 13px; line-height: 1.4; color: #6d6064; }
.pwa-banner .primary-button { min-height: 40px; padding: 0 16px; }
.pwa-banner-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f3ebe6; color: #6d6064; font-size: 18px; cursor: pointer; }
/* Laisse la place à la barre de navigation mobile du tableau de bord. */
@media (max-width: 900px) { body:has(.mobile-nav) .pwa-banner { bottom: calc(84px + env(safe-area-inset-bottom)); } }
@media (max-width: 420px) { .pwa-banner { grid-template-columns: 40px 1fr auto auto; gap: 10px; } .pwa-banner span { display: none; } .pwa-banner img { width: 40px; height: 40px; } }

.pwa-ios-help { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 24px); overflow: auto; width: min(420px, calc(100% - 24px)); border: 0; border-radius: 22px; padding: 22px; background: #fffdf9; color: #2b2025; box-shadow: 0 30px 90px #3e252e40; }
.pwa-ios-help::backdrop { background: #2b202580; }
.pwa-ios-head { display: grid; grid-template-columns: 48px 1fr 32px; gap: 12px; align-items: center; margin-bottom: 14px; }
.pwa-ios-head img { border-radius: 12px; }
.pwa-ios-head strong { display: block; font: 600 18px Georgia, serif; }
.pwa-ios-head span { font-size: 13px; color: #8b7d82; }
.pwa-ios-head button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f3ebe6; font-size: 18px; cursor: pointer; }
.pwa-ios-help ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.pwa-ios-help li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.5; }
.pwa-ios-help li svg { display: inline; vertical-align: -3px; color: #2f6fd6; }
.pwa-step { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--wine, #753b4c); color: #fff; font-weight: 700; font-size: 13px; }
.pwa-ios-warning { margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: #fff4e0; color: #7a4f12; font-size: 13px; }
.pwa-ios-help > .primary-button { width: 100%; justify-content: center; }


/* --- Tailles de texte : ajustements après le passage à des polices plus lisibles --- */
.readiness-ring small { font-size: 9px; letter-spacing: 0; }
